{extends file="backend/index.tpl"}
{block name="page-content"}
<div class="page-header">
    <div class="icon">
        <span class="ico-pen-2"></span>
    </div>
    <h1>TÁC GIẢ <small>QUẢN LÝ TÁC GIẢ</small></h1>
</div>
<form id="validate" action="{$base_url}admin/author/addAuthor" method="post">
<div class="row-fluid">
    <div class="span6">
        <div class="block">
            <div class="head">
                <h2>Thêm Tác Giả</h2>
            </div>
            <div class="data-fluid">
                <div class="row-form">
					<div class="span3">Name</div>
					<div class="span9">
						<input type="text" class="validate[required]" name="name" />
					</div>
				</div>
				<div class="row-form">
					<div class="span3">Birthday</div>
					<div class="span9">
						<input type="text" name="birthday" id="popupDatepicker">
					</div>
				</div>
				<div class="toolbar bottom tac">
                    <div class="btn-group">
                        <button class="btn btn-info" type="button" onClick="$('#validate').validationEngine('hide');">Ẩn Thông Báo</button>
                        <button class="btn" type="submit" name="submit" id="addBook">Thêm Tác Giả</button>
                    </div>
                </div>
			</div>
		</div>
	</div>
	<div class="span6">
        <div class="block">
        	<div class="head">
                <h2></h2>
            </div>
        	 <div class="data-fluid">
				<div class="row-form">
					<div class="span3">Gender</div>
					<div class="span9">
						<input type="radio" class="validate[required]" checked="checked"
							name="gender" value="F" /> Female <input type="radio"
							class="validate[required]" name="gender" value="M" /> Male
					</div>
				</div>
				<div class="row-form">
					<div class="span3">Nation</div>
					<div class="span9">
						<select name ="nation">
                        	<option >Select Country</option>
                        	<option value="Việt Nam">Việt Nam</option>
                        	<option value="Nhật Bản">Nhật Bản</option>
                        	<option value="Trung Quốc">Trung Quốc</option>
                        </select>
					</div>
				</div>
            </div>
        </div>
    </div>
</div>
</form>
<div class="row-fluid">
    <div class="span12">
        <div class="block">
            <div class="head dblue">
                <div class="icon"><span class="ico-layout-9"></span></div>
                <h2>Danh Sách Tác Giả</h2>
                <ul class="buttons">
                    <li><a href="#" onClick="source('table_sort_pagination'); return false;">
                        <div class="icon"><span class="ico-info"></span></div>
                    </a></li>
                </ul>
            </div>
            <div class="data-fluid">
                <table class="table lcnp" id="listGame" cellpadding="0" cellspacing="0" width="100%">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Name</th>
                            <th>Gender</th>
                            <th>Birthday</th>
                            <th>Nation</th>
                            <th width="80" class="TAC">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                    {foreach from=$listAuthor item=author}
                        <tr class="edit_tr">
                            <td width="5%">{$author.id}</td>
                            <td width="30%">{$author.name}</td>
                            <td width="15%">{if $author.gender eq 'F'}Female{elseif $author.gender eq 'M'}Male{else}{/if}</td>
                            <td width="15%">{$author.birthday}</td>
                            <td width="15%">{$author.nation}</td>
                            <td width="15%">
                                <a href="{$base_url}admin/update-author/{$author.id}.html" class="button green">
                                    <div class="icon"><span class="ico-pencil"></span></div>
                                </a>
                                <a href="{$base_url}admin/delete-author/{$author.id}" class="button red" onclick="return confirm('Bạn có muốn xóa tiếp không?')">
                                    <div class="icon"><span class="ico-remove"></span></div>
                                </a>
                            </td>
                        </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
{/block}
